/**
* @file   BitmapLoaderTest.cpp
* @brief  Implementation file for class BitmapLoaderTest
* @date   2011-04-16 00:22:51
* @author Yanze Lian
* @email  <yanzel@gmail.com>
*/

#include "stdafx.h"
#include "BitmapLoaderTest.h"
#include "..\..\VideoEditor\FilterTitleOverlay\BitmapLoader.h"


CPPUNIT_TEST_SUITE_REGISTRATION(BitmapLoaderTest);

BitmapLoaderTest::BitmapLoaderTest()
{
}

BitmapLoaderTest::~BitmapLoaderTest()
{
}

void BitmapLoaderTest::setUp()
{
}

void BitmapLoaderTest::tearDown()
{
}

void BitmapLoaderTest::test()
{
	BYTE* pData = NULL;
	int length = 0;
	BITMAPINFOHEADER bmpHeader;
	CPPUNIT_ASSERT_EQUAL(true, BitmapLoader::Load("c:\\1.bmp", &bmpHeader, &pData, length));
	CPPUNIT_ASSERT_EQUAL(true, pData > 0);
	CPPUNIT_ASSERT_EQUAL(1244160, length);

	
	if (pData != NULL)
	{
		delete[] pData;
		pData = NULL;
	}
}

